package com.monitor.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 品牌型号表
 * </p>
 *
 * @author LX
 * @since 2018-09-13
 */
@TableName("erp_model")
public class ErpModel extends Model<ErpModel> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 自身id
     */
    private String zid;
    /**
     * 上级ID
     */
    private String pid;
    private String name;
    /**
     * 判断等级
     */
    private Integer iszh;

    /**
     * 是新增还是修改, ture是新增 false是修改
     */
    private transient boolean addOrXiuGai;

    public boolean getAddOrXiuGai() {
        return addOrXiuGai;
    }

    public void setAddOrXiuGai(boolean addOrXiuGai) {
        this.addOrXiuGai = addOrXiuGai;
    }

    private transient List<ErpModel> model;

    public List<ErpModel> getModel() {
        return model;
    }

    public void setModel(List<ErpModel> model) {
        this.model = model;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getZid() {
        return zid;
    }

    public void setZid(String zid) {
        this.zid = zid;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getIszh() {
        return iszh;
    }

    public void setIszh(Integer iszh) {
        this.iszh = iszh;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "ErpModel{" +
        ", id=" + id +
        ", zid=" + zid +
        ", pid=" + pid +
        ", name=" + name +
        ", iszh=" + iszh +
        "}";
    }
}
